import { Result } from "../models/HomePage/index";

export function getMyBusiness(instance: any, val) {
  return new Promise((resolve, reject) => {
    const { $axios } = instance;
    $axios({
      url: "/new/MyBusiness",
      method: "get"
    }).then(res => {
      let item: Result = {
        status: 0,
        data: ""
      };
      if (res && res.status === 200) {
        item.data = res.data.data;
        resolve(item);
      } else {
        item.status = 1;
        item.data = "数据错误";
        reject(item);
      }
    });
  });
}
